package com.bdqn.jiang.utils;

import com.bdqn.jiang.Service.BaseService;
import com.bdqn.jiang.Service.impl.*;

public class ServiceFactory {
    //返回业务的实现类
    public BaseService getBean(){
        return new StartServesImpl();
    }

    public static BaseService getService(String key){
        if("start".equals(key)){
            return (BaseService) new  StartServesImpl();
        }else if("login".equals(key)){
            return (BaseService) new LoginServiceIml();
        }else if ("register".equals(key)){

            return (BaseService) new RegisterServiceImpl();

        }else if ("leix".equals(key)){
            return (BaseService) new leixServiclml();
        }else if ("GetNove".equals(key)){
            return (BaseService) new GetNovelsService();
    }
        return null;
}

}
